import { ref, reactive, onMounted } from "vue";
import { ArrowLeftBold } from "@element-plus/icons-vue";
import { ipc } from "@/utils/ipcRenderer";
import { ipcApiRoute } from '@/api/main';

/**
 * 窗口大小
 */
export const useResize = () => {
  const resizeList = ref([
    {
      title: "最小化",
      iconName: "icon-minus",
      value: "minimize",
      action() {
        ipc.invoke(ipcApiRoute[this.value]);
      },
    },
    // {
    //   title: "最大化",
    //   iconName: "icon-maximize",
    //   value: "maximize",
    //   action() {
    //     ipc.invoke(ipcApiRoute[this.value]);
    //   },
    // },
    {
      title: "关闭",
      iconName: "icon-Quit",
      value: "quit",
      action() {
        ipc.invoke(ipcApiRoute.stopCmd);
        ipc.invoke(ipcApiRoute[this.value]);
      },
    },
  ]);

  return { resizeList };
};



/**icon */
export const useElementIcon = () => {
  return { ArrowLeftBold };
};
